
root=Node()
axes = Node(root)
axes.Load("axes.osg")
axes.SetScale(10,10,10)

m = Morph(root)
m.Load("Teapot.osg")
m.AddTarget("Teapot01.osg")
m.AddTarget("Teapot02.osg")
m.SetTargetWeights( Vec(1,1,0,0) )

viewer.SetRoot(root)    
cm.Fit(m)    

#---------------------------------    
def cp():
    print "cp = CameraPose", cm.GetPose().Repr()
    
#---------------------------------    

# 1) --- espressione invece di Valore 0
# 2) --- 

def slide0():
    
    am.clear()
    Anim(T,1,   m.SetTargetWeights, Vec(0,0,0,0), Vec(2,0,0,0)  )
    Anim(T,1,   m.SetTargetWeights, Vec(2,0,0,0), Vec(0,0,0,0)  )
    Anim(T,1,   m.SetTargetWeights, Vec(0,0,0,0), Vec(-2,0,0,0)  )
    Anim(T,1,   m.SetTargetWeights, Vec(-2,0,0,0), Vec(0,0,0,0)  )

    Anim(T,1,   m.SetTargetWeights, Vec(0,0,0,0), Vec(0,2,0,0)  )
    Anim(T,1,   m.SetTargetWeights, Vec(0,2,0,0), Vec(0,0,0,0)  )
    Anim(T,1,   m.SetTargetWeights, Vec(0,0,0,0), Vec(0,-2,0,0)  )
    Anim(T,1,   m.SetTargetWeights, Vec(0,-2,0,0), Vec(0,0,0,0)  )

    Anim(T,1,   m.SetTargetWeights, Vec(0,0,0,0), Vec(2,2,0,0)  )
    Anim(T,1,   m.SetTargetWeights, Vec(2,2,0,0), Vec(0,0,0,0)  )
    Anim(T,1,   m.SetTargetWeights, Vec(0,0,0,0), Vec(-2,-2,0,0)  )
    Anim(T,1,   m.SetTargetWeights, Vec(-2,-2,0,0), Vec(0,0,0,0)  )
    am.play()
   

#---------------------------------    
slides = [
  ("Slide0",slide0),
]


